#ifndef ITTFUNC_H
#define ITTFUNC_H

#include <windows.h>

class IttFunc
{
public:
	virtual int run(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) = 0;
	virtual int runShell(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) = 0;
	//return 0 need default func work
	//return 1 no need
};

#define MAKEFUNC(funcname) \
class funcname: \
	public IttFunc \
{ \
public: \
	virtual int run(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); \
	virtual int runShell(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); \
}; 

#define IMPLFUNC(funcname, funcmsg) \
int funcname::runShell(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) \
{ \
	if (funcmsg == message){ \
		return run(hwnd, message, wParam, lParam); \
	} \
	return -1; \
}\
int funcname::run(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
#endif